const {By} = require("selenium-webdriver");
module.exports = {
  changePassword: async (driver, oldPwd, newPwd, repeatPwd) => {
    {
        const element = await driver.findElement(By.css(".avatar > img"))
        await driver.actions({ bridge: true }).move(element).perform()
    }
    await driver.findElement(By.css(".menuActionItem > span:nth-child(1)")).click();
    await driver.findElement(By.css(".el-row:nth-child(1) .el-input__inner")).click();
    await driver.findElement(By.css(".el-row:nth-child(1) .el-input__inner")).sendKeys(oldPwd);
    await driver.findElement(By.css(".el-row:nth-child(2) .el-input__inner")).click();
    await driver.findElement(By.css(".el-row:nth-child(2) .el-input__inner")).sendKeys(newPwd);
    await driver.findElement(By.css(".el-row:nth-child(3) .el-input__inner")).click();
    await driver.findElement(By.css(".el-row:nth-child(3) .el-input__inner")).sendKeys(repeatPwd);
    await driver.findElement(By.css(".confirm > span")).click();  
}
}
